2020-2021 Sunseeker Telemetry and Lighting System
timer_b_ex5_singlePWM.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define TIMER_PERIOD   511
 
#define DUTY_CYCLE   383
 

Functions

void main (void)
 

Macro Definition Documentation

◆ DUTY_CYCLE

#define DUTY_CYCLE   383

Definition at line 64 of file timer_b_ex5_singlePWM.c.

◆ TIMER_PERIOD

#define TIMER_PERIOD   511

Timer_B, PWM TB0.1, Up Mode, DCO SMCLK

Description: This program generates PWM outputs on P2.6 using Timer_B configured for up mode. The value , TIMER_PERIOD, defines the PWM period and the value DUTY_CYCLE the PWM duty cycle. Using ~1.045MHz SMCLK as TBCLK, the timer period is ~488us with a 75% duty cycle on P2.6 ACLK = n/a, SMCLK = MCLK = TBCLK = default DCO ~1.045MHz.

Tested On: MSP430FR5969

/ |
RST

| | | P2.6/TB0.1|--> CCR1 - 75% PWM | |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • Timer peripheral
  • GPIO Port peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • NONE

Definition at line 63 of file timer_b_ex5_singlePWM.c.

Function Documentation

◆ main()

void main ( void  )

Definition at line 66 of file timer_b_ex5_singlePWM.c.

References __no_operation(), DUTY_CYCLE, param, and TIMER_PERIOD.